package main

import (
	"log"
	"net"
	"net/http"
	"net/rpc"
	"serve/serve"
	"time"
)

func main() {
	arith := new(serve.Arith)
	rpc.Register(arith)
	rpc.HandleHTTP()
	l, e := net.Listen("tcp", ":1234")
	if e != nil {
		log.Fatal("listen error :", e)
	}
	go http.Serve(l, nil)
	for true {
		time.Sleep(time.Duration(2) * time.Second)
	}
}
